#!/usr/bin/python
# -*- coding: UTF-8 -*-
import logging
import logging.config
import yaml

# 通过yaml文件配置logging
f = open("logging.conf.yaml")
# dic = yaml.load(f)
dic = yaml.load(f, Loader=yaml.FullLoader)
f.close()
logging.config.dictConfig(dic)

# 创建logger
logger = logging.getLogger('simpleExample')
logger1 = logging.getLogger('simpleExample1')

# 输出日志
logger.debug('debug message')
logger.info('info message')
logger.warning('warn message')
logger.error('error message')
logger.critical('critical message')


logger1.debug('debug message')
logger1.info('info message')
logger1.warning('warn message')
logger1.error('error message')
logger1.critical('critical message')